/** * @file: post_process.h * @author: sdk team * @brief * @version: 1.0 * @date 2022-10-09 * * Copyright: * © 2018 北京灵汐科技有限公司 版权所有。 * 注意:以下内容均为北京灵汐科技有限公司原创,未经本公司允许,不得转载,否则将视为侵权;对于不遵守此声明或者其他违法使用以下内容者,本公司依法保留追究权。 * © 2018 Lynxi Technologies Co., Ltd. All rights reserved. * NOTICE: All information contained here is, and remains the property of Lynxi. This file can not be copied or distributed without the permission of Lynxi Technologies Co., Ltd. */ #ifndef __POST_PROCESS_H__ #define __POST_PROCESS_H__ #ifdef __cplusplus extern "C" { #endif #include <stdint.h> #include <wchar.h> #include "lyn_api.h" #include "lyn_plugin_dev.h" #include "drawTool.h" #define MAX_MERGE_NUM 4 typedef struct { uint32_t imgW; // 原始图像宽 uint32_t imgH; // 原始图像高 uint32_t modelW; // 模型输入图像宽 uint32_t modelH; // 模型输入图像高 uint32_t modelClassNum; // 模型输入分类 uint32_t nmsTopK = 500; uint16_t modelAnchorSize; float scoreThreshold = 0.25; float nmsThreshold = 0.45; bool isPadResize = true; void *apuData; // apu输出数据 lynBoxesInfo *boxesInfo; // 输出box信息 } lynPostProcessPara; typedef struct { lynBoxesInfo* target; // 目标 lynBoxesInfo* sources[MAX_MERGE_NUM]; // 多个源数据 uint16_t sourcesCount; // 源数据数量 } BoxMergeParams; /** * @brief 模型后处理 * * @param para * @return int */ int lynPostProcess(lynPostProcessPara *para); int mergeBoxes(BoxMergeParams* para); #ifdef __cplusplus } #endif #endif